package com.i.template.util;

import io.netty.util.concurrent.FastThreadLocal;

/**
 * @author lewis
 * @type class
 * @description
 * @since 2024/7/25
 */
public class UserHolder {
    private static final FastThreadLocal<Long> USER = new FastThreadLocal<>();
    public static void setUser(Long uid){
        USER.set(uid);
    }
    public static Long getUser() {
        return USER.get();
    }
    public static void clear(){
        USER.remove();
    }
}
